//
//  DvdCollectionViewCell.m
//  SugarPile
//
//  Created by Charlie. on 16/1/23.
//  Copyright © 2016年 www.lanou39.蓝鸥科技. All rights reserved.
//

#import "DvdCollectionViewCell.h"

@implementation DvdCollectionViewCell
- (void)dealloc
{
    [_dvdImage release];
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.dvdImage = [[UIImageView alloc] init];
        [self.contentView addSubview:_dvdImage];
        self.dvdImage.backgroundColor = [UIColor waterPink];
        [_dvdImage release];
    }
    return self;
}
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    _dvdImage.frame = CGRectMake(0, 0, layoutAttributes.bounds.size.height, layoutAttributes.bounds.size.height);
    // image 图片平铺
    _dvdImage.contentMode = UIViewContentModeScaleAspectFill;
    _dvdImage.clipsToBounds = YES;
}
@end
